docs: comprehensive documentation audit with fixes#851
Closed
cursor[bot] wants to merge 2 commits intomainfrom
Closed
docs: comprehensive documentation audit with fixes#851cursor[bot] wants to merge 2 commits intomainfrom
cursor[bot] wants to merge 2 commits intomainfrom
Conversation
Audit findings and fixes: - Add SENTRY_CUSTOM_HEADERS, proxy/IAP config, .sentryclirc, multi-region, and token precedence sections to self-hosted docs - Add SENTRY_RELEASE to env-registry (used by propose-version but undocumented) - Add missing bash examples for release delete, release deploys, and event list - Fix Bun version claims: v1.0+ → v1.3+ (matches packageManager field) - Fix Node.js version: ≥22 → ≥22.12 (matches engines.node) - Add platform/architecture support table to getting-started (macOS, Linux glibc/musl, Windows via Git Bash) - Document SENTRY_INSTALL_DIR in getting-started - Add SENTRY_CONFIG_DIR to DEVELOPMENT.md env table with link to full reference - Add test:unit, test:e2e, generate:docs to README scripts section - Add .sentryclirc mention to README Configuration section - Include full gap report as DOCUMENTATION_AUDIT.md Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Contributor
|
Contributor
Codecov Results 📊✅ 6007 passed | Total: 6007 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 12882 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 75.56% 75.60% +0.04%
==========================================
Files 286 286 —
Lines 52814 52793 -21
Branches 0 0 —
==========================================
+ Hits 39906 39911 +5
- Misses 12908 12882 -26
- Partials 0 0 —Generated by Codecov Action |
BYK
added a commit
that referenced
this pull request
Apr 29, 2026
) ## Summary Extend `generate-docs-sections.ts` with 7 new marker-based sections that eliminate documentation drift by auto-generating content from source code. Also adds missing `SENTRY_RELEASE` to the env var registry and hand-written examples for `release delete`/`deploys` and `event list`. Supersedes #851 with structural automation instead of manual patching (same relationship as #739 → #724). ## What's auto-generated now | Section | File | Source of Truth | |---------|------|----------------| | Dev prerequisites | `README.md`, `contributing.md` | `packageManager` in `package.json` | | Library prerequisites | `README.md` | `engines.node` in `package.json` | | Dev scripts | `README.md` | Curated subset (descriptions aren't machine-readable) | | Dev env var table | `DEVELOPMENT.md` | `env-registry.ts` entries with `devGuide` tag | | Self-hosted env var table | `self-hosted.md` | `env-registry.ts` entries with `selfHosted` tag | | Platform support | `getting-started.mdx` | Static data matching `ALL_TARGETS` in `build.ts` | | *(existing)* Project structure | `contributing.md` | Route tree introspection | | *(existing)* OAuth scopes | `DEVELOPMENT.md`, `self-hosted.md` | `OAUTH_SCOPES` array | ## What was wrong with #851 1. **`SENTRY_CUSTOM_HEADERS` format was documented as comma-separated `key:value`** — the actual code (`src/lib/custom-headers.ts`) uses **semicolon-separated `Name: Value` pairs**. Would have shipped incorrect docs. 2. **Manual fixes to driftable content** — version numbers, env var tables, and platform support will go stale again. This PR generates them from source code instead. 3. **Committed `DOCUMENTATION_AUDIT.md` at repo root** — a 162-line audit report that becomes stale immediately. 4. **Manually edited skill files** — these are auto-generated from fragments; editing them directly means the next `generate:docs` overwrites the manual changes. ## Changes ### Source-of-truth additions - `SENTRY_RELEASE` added to `env-registry.ts` (flows into auto-generated `configuration.md`) - `selfHosted` and `devGuide` tags added to `EnvVarEntry` type and relevant entries ### Generator extensions (`script/generate-docs-sections.ts`) - MDX marker support (`{/* GENERATED:START */}` syntax for `.mdx` files) - `dev-prereq`: Bun version from `packageManager` field - `library-prereq`: Node version from `engines.node` - `dev-scripts`: Curated script list with descriptions - `dev-env-vars`: Table from registry entries tagged `devGuide` - `self-hosted-env-vars`: Table from entries tagged `selfHosted`, with cross-validation - `platform-support`: Platform/architecture table ### Fragment additions (hand-written, as designed) - `release.md`: Examples for `release delete` (with `--yes`, `--dry-run`) and `release deploys` - `event.md`: Full "Listing Events" section with query, full, period, pagination, JSON examples ### CI - `README.md` and `getting-started.mdx` added to `check-generated` git-diff and auto-commit lists
Member
|
Addressed this in a different way in #873. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation Audit Report
Full cross-reference of the Sentry CLI implementation code against all documentation surfaces. The audit read every command implementation, route map, distribution script, auth/config module, and plugin/skills system, then compared against README.md, DEVELOPMENT.md, the Astro doc site, and hand-written fragments.
Changes Made
Self-hosted docs (
docs/src/content/docs/self-hosted.md):SENTRY_CUSTOM_HEADERSsection for proxy/IAP configuration.sentryclircconfig file section for self-hosted setupsSENTRY_FORCE_ENV_TOKEN)SENTRY_FORCE_ENV_TOKENandSENTRY_CUSTOM_HEADERSto env var tableEnvironment variable registry (
src/lib/env-registry.ts):SENTRY_RELEASE— used bysentry release propose-versionas the highest-priority version source, but was missing from the auto-generated configuration pageCommand doc fragments:
release.md: Added bash examples forrelease delete(with--yes,--dry-run) andrelease deploysevent.md: Added full "Listing Events" section with examples forevent list(query, full, period, pagination, JSON)Version accuracy (
README.md,DEVELOPMENT.md,contributing.md):v1.0+→v1.3+(matchespackageManager: bun@1.3.13)≥22→≥22.12(matchesengines.node)test:unit,test:e2e,generate:docsto README scripts section.sentryclircmention to README Configuration sectionPlatform support (
docs/src/content/docs/getting-started.mdx):SENTRY_INSTALL_DIRenv var for custom install pathsDEVELOPMENT.md:
SENTRY_CONFIG_DIRto env tableFull Gap Report
The complete structured gap report is included as
DOCUMENTATION_AUDIT.mdat the repo root. It covers:Top 5 Most Impactful Fixes (all addressed in this PR)